﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="productitemeditor.aspx.cs"
    Inherits="website_admin_insurance_productitemeditor" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>编辑产品信息</title>
    <script type="text/javascript" src="../_static/_jQuery/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../../admin/_static/_jQuery/jquery_validator.js"></script>
    <script type="text/javascript" language="javascript" src="../_common/scripts/util.js"></script>
    <script language="javascript" src="../_static/_jQuery/jquery-fileupload.js" type="text/javascript"></script>
    <script language="javascript" src="../_static/_jQuery/interface.js" type="text/javascript"></script>
    <link href="../_common/styles/form_v2_0.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            validator.setup("#form1", "");
            $("#txtProductItemName").select();
            if ($("#IsExistCard").val() == "1") {
                $("#txtDays").attr("readonly", true).addClass("tbxReadOnly");
                $("#txtPrice").attr("readonly", true).addClass("tbxReadOnly");
                $("#btnFind").css("display", "none");
            }

            IsCheck();

            if (getUrlParam("typecode") != "") {
                $("#chkIsOrganizationBill").attr("disabled", true);
                $("#chkIsIProductItem").attr("disabled", true);
            }

            $("#cbxAllowAdditionalMonth").click(function () {
                if ($("#cbxAllowAdditionalMonth").attr("checked")) {
                    $("#trAllowAdditional").css("display", "");
                }
                else {
                    $("#trAllowAdditional").css("display", "none");
                }
            });

            if ($("#cbxAllowAdditionalMonth").attr("checked")) {
                $("#trAllowAdditional").css("display", "");
            }
            else {
                $("#trAllowAdditional").css("display", "none");
            }
        });

        function Verification() {
            var bl = validator.validatorAll();
            return bl;
        }
        function IsCheck() {
            if ($("#chkIsIProductItem").attr("checked")) {
                $("#txtICode").attr("disabled", false);
                $("#txtICombinationName").attr("disabled", false);
            } else {
                $("#txtICode").attr("disabled", true);
                $("#txtICombinationName").attr("disabled", true);
            }
        }
    </script>
</head>
<body scrool="no" style="margin: 0px; padding: 0px; background: #F0F0F0;">
    <script type="text/javascript">
        <!--
        function __doPostBack(eventTarget, eventArgument) {
            var theForm = document.forms["form1"];
            if (!theForm) {
                theForm = document.form1;
            }
            if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
                theForm.__EVENTTARGET.value = eventTarget;
                theForm.__EVENTARGUMENT.value = eventArgument;
                theForm.submit();
            }
        }
        // -->
    </script>
    <div id="success" style="position: absolute; z-index: 300; height: 130px; width: 284px;
        left: 50%; top: 50%; margin-left: -150px; margin-top: -80px;">
        <div style="position: absolute; z-index: 300; width: 270px; height: 90px; background-color: #FFFFFF;
            border: solid #6699CC 1px; font-size: 14px;">
            <div style="height: 64px; line-height: 150%; padding: 0px 3px 0px 3px;" align="center">
                <br />
                <table>
                    <tr>
                        <td valign="top">
                            <img border="0" src="../_imgs/admin/progress.gif" />
                        </td>
                        <td valign="middle" style="font-size: 14px; width: 150px;">
                            操作执行中 ...<br />
                        </td>
                    </tr>
                </table>
                <br />
            </div>
        </div>
        <div style="position: absolute; width: 270px; height: 108px; z-index: 299; left: 4px;
            top: 5px; background-color: #E8E8E8; border: #E8E8E8 1px solid; display: none;">
        </div>
    </div>
    <script type="text/javascript">
        document.getElementById("success").style.display = "none"; 
    </script>
    <script language="JavaScript1.2" src="../../_common/scripts/divcover.js" type="text/javascript"></script>
    <form id="form1" runat="server">
    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
    <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
    <input type="hidden" id="IsExistCard" value="0" runat="server" />
    <table cellpadding="0" cellspacing="0" class="WIN-Form-Layout">
        <tr style="height: 32px;">
            <td colspan="1" class="WIN-Form-Title-Bar">
                <span>编辑产品明细</span>
            </td>
        </tr>
        <tr style="height: 100%; background: #ffffff;">
            <td valign="top" style="padding: 10px 10px 10px 0px;">
                <div class="content">
                    <div class="checkoutBox noBorder" id="errorMsg" runat="server" style="background: #FFFDCF;
                        width: 762px; line-height: 21px; padding: 10px;" visible="false">
                    </div>
                    <div class="checkoutBox noBorder">
                        <div class="tabContainer">
                            <ul class="tabHead">
                                <li class="currentBtn"><a id="a21" title="常规">常规</a></li>
                            </ul>
                        </div>
                        <div class="clear">
                        </div>
                        <ul class="infoList edit" id="tab_21">
                            <li style="width: 100%; height: auto;">
                                <table class="stdTable" cellpadding="3" cellspacing="5" style="width: 90%; margin-left: 10px;">
                                    <colgroup>
                                        <col style="width: 115px; text-align: right;" />
                                        <col />
                                        <col style="width: 115px; text-align: right;" />
                                        <col />
                                    </colgroup>
                                    <tbody>
                                        <tr>
                                            <td style="text-align: right;">
                                                <label for="txtProductItemName">
                                                    <img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />名称：</label>
                                            </td>
                                            <td colspan="3">
                                                <input type="text" id="txtProductItemName" name="txtProductItemName" class="textbox"
                                                    runat="server" required="required" controlname="名称" isvalidator />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">
                                                <label for="selProductList">
                                                    <img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />
                                                    所属产品：</label>
                                            </td>
                                            <td colspan="3">
                                                <select id="selProductList" name="selProductList" runat="server" class="SelectBox"
                                                    required="required" controlname="所属产品" isvalidator>
                                                    <option value="">-- 请选择 --</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">
                                                <label for="txtDays">
                                                    <img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />保障天数：</label>
                                            </td>
                                            <td>
                                                <input type="text" id="txtDays" class="textbox" runat="server" style="width: 120px;"
                                                    required="required" controlname="天数" isvalidator datatype="integer" value="0" />
                                            </td>
                                            <td style="text-align: right;">
                                                <label for="txtPrice">
                                                    <img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />
                                                    售价<span>&nbsp;(元)</span>：</label>
                                            </td>
                                            <td>
                                                <input type="text" id="txtPrice" class="textbox" runat="server" style="width: 120px;"
                                                    required="required" controlname="售价" isvalidator datatype="float" value="0.00" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">
                                                <label for="txtIntegral">
                                                    <img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />积分：</label>
                                            </td>
                                            <td>
                                                <input type="text" id="txtIntegral" class="textbox" runat="server" style="width: 120px;"
                                                    required="required" controlname="积分" isvalidator datatype="integer" value="0" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">
                                                <label for="selStatusCode">
                                                    <img src="../_imgs/admin/frm_required.gif" title="必选项" alt="必选项" />
                                                    状态：</label>
                                            </td>
                                            <td>
                                                <select id="selStatusCode" runat="server" style="width: 60px;">
                                                    <option value="0">销售</option>
                                                    <option value="1">停售</option>
                                                </select>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </li>
                        </ul>
                        <div class="clear">
                        </div>
                    </div>
                </div>
            </td>
        </tr>
        <tr style="height: 45px;">
            <td class="WIN-Form-Bottom">
                <input type="submit" value="保存并新建" id="btnSave" class="btn_o_120" onclick="if(Verification()){this.disabled=true;success.style.display='block';HideOverSels('success');__doPostBack('saveinfo', 'saveandnew');}" />
                <input id="Button3" runat="server" class="btn_o_120" value="保 存" type="button" onclick="if(Verification()){this.disabled=true;success.style.display='block';HideOverSels('success');__doPostBack('saveinfo','saveandclose');}" />
                <input type="button" value="关闭窗口" id="Button2" class="btn_o_120" onclick="window.close();" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
